package it.etoken.component.news.dao.mapper;

import it.etoken.base.model.news.entity.JobManager;
import it.etoken.base.model.news.entity.JobManagerExample;
import it.etoken.base.model.news.entity.News;
import it.etoken.component.news.dao.provider.JobManagerSqlProvider;

import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;
@Mapper
public interface JobManagerMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table job_manager
     *
     * @mbg.generated Thu Jun 28 18:57:26 CST 2018
     */
    @SelectProvider(type=JobManagerSqlProvider.class, method="countByExample")
    long countByExample(JobManagerExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table job_manager
     *
     * @mbg.generated Thu Jun 28 18:57:26 CST 2018
     */
    @DeleteProvider(type=JobManagerSqlProvider.class, method="deleteByExample")
    int deleteByExample(JobManagerExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table job_manager
     *
     * @mbg.generated Thu Jun 28 18:57:26 CST 2018
     */
    @Delete({
        "delete from job_manager",
        "where id = #{id,jdbcType=BIGINT}"
    })
    int deleteByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table job_manager
     *
     * @mbg.generated Thu Jun 28 18:57:26 CST 2018
     */
    @Insert({
        "insert into job_manager (id, job_name, ",
        "status, createdate, ",
        "modifydate)",
        "values (#{id,jdbcType=BIGINT}, #{jobName,jdbcType=VARCHAR}, ",
        "#{status,jdbcType=VARCHAR}, #{createdate,jdbcType=TIMESTAMP}, ",
        "#{modifydate,jdbcType=TIMESTAMP})"
    })
    int insert(JobManager record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table job_manager
     *
     * @mbg.generated Thu Jun 28 18:57:26 CST 2018
     */
    @InsertProvider(type=JobManagerSqlProvider.class, method="insertSelective")
    int insertSelective(JobManager record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table job_manager
     *
     * @mbg.generated Thu Jun 28 18:57:26 CST 2018
     */
    @SelectProvider(type=JobManagerSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="job_name", property="jobName", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.VARCHAR),
        @Result(column="createdate", property="createdate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="modifydate", property="modifydate", jdbcType=JdbcType.TIMESTAMP)
    })
    List<JobManager> selectByExample(JobManagerExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table job_manager
     *
     * @mbg.generated Thu Jun 28 18:57:26 CST 2018
     */
    @Select({
        "select",
        "id, job_name, status, createdate, modifydate",
        "from job_manager",
        "where id = #{id,jdbcType=BIGINT}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="job_name", property="jobName", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.VARCHAR),
        @Result(column="createdate", property="createdate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="modifydate", property="modifydate", jdbcType=JdbcType.TIMESTAMP)
    })
    JobManager selectByPrimaryKey(Long id);
    
    
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table job_manager
     *
     * @mbg.generated Thu Jun 28 18:57:26 CST 2018
     */
    @Select({
        "select",
        "id, job_name, status, createdate, modifydate",
        "from job_manager",
        "where job_name = #{jobname}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="job_name", property="jobName", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.VARCHAR),
        @Result(column="createdate", property="createdate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="modifydate", property="modifydate", jdbcType=JdbcType.TIMESTAMP)
    })
    JobManager selectByJobname(@Param("jobname") String jobname);
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table job_manager
     *
     * @mbg.generated Thu Jun 28 18:57:26 CST 2018
     */
    @UpdateProvider(type=JobManagerSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") JobManager record, @Param("example") JobManagerExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table job_manager
     *
     * @mbg.generated Thu Jun 28 18:57:26 CST 2018
     */
    @UpdateProvider(type=JobManagerSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") JobManager record, @Param("example") JobManagerExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table job_manager
     *
     * @mbg.generated Thu Jun 28 18:57:26 CST 2018
     */
    @UpdateProvider(type=JobManagerSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(JobManager record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table job_manager
     *
     * @mbg.generated Thu Jun 28 18:57:26 CST 2018
     */
    @Update({
        "update job_manager",
        "set job_name = #{jobName,jdbcType=VARCHAR},",
          "status = #{status,jdbcType=VARCHAR},",
          "createdate = #{createdate,jdbcType=TIMESTAMP},",
          "modifydate = #{modifydate,jdbcType=TIMESTAMP}",
        "where id = #{id,jdbcType=BIGINT}"
    })
    int updateByPrimaryKey(JobManager record);
}